import { connect } from 'react-redux'
import { Avatar, Image } from 'antd';

const Header = (props) => {

    const { userInfo } = props;
    return <div className="header">
        <div>
            <Avatar size={50} src={<Image src={userInfo.avatar_url} style={{ width: 50, height: 50 }} />} />
            {userInfo.name}
            </div>
    </div>
}

const mapStateToProps = state => state

export default connect(mapStateToProps)(Header)